package cn.wolfcode.edu.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Getter@Setter
public class FormalStudent extends BaseDomain{
    public static final int ALREADY_PAID = 1;//已缴清
    public static final int NOT_YET_PAID = -1;//未缴清
    public static final int NEVER_PAID = 0;// 尚未付款


    private BigDecimal receivable = BigDecimal.ZERO;//应收学费
    private BigDecimal discount = BigDecimal.ZERO;//优惠
    private BigDecimal otherCost = BigDecimal.ZERO;//其他费用
    private String discountInfo;//优惠说明
    private BigDecimal totalTuition = BigDecimal.ZERO;//总学费
    private BigDecimal advance = BigDecimal.ZERO;//定金
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date paymentTime;//支付时间
    private SystemDictionaryItem paymentMethod;//支付方式
    private int paidStatus = NEVER_PAID;//支付状态(结清/未结清)
    private Client client;//关联的潜在客户
    private Long IDNum;//身份证号
    private String emergencyContact;//紧急联系人
    private String emergencyTel;//紧急联系电话
    private String studentName;//姓名
    private Employee saleman;//营销人员
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date enrollTime;//入学时间
    private String school;//学校
    private String tel;//电话
    private ClassGrade clz;//所在班级
    private BigDecimal alreadyPaid = BigDecimal.ZERO;//已缴学费
    private BigDecimal remainPaid = BigDecimal.ZERO;//尚未缴清学费
    private int status = NORMAL_STATUS;//学生状态:正常/流失/休学
    public static final int NORMAL_STATUS = 0;//正常
    public static final int Quit_STATUS = 1;//休学
    public static final int LOSE_AUDIT = 2;//退学审核中
    public static final int LOSE_STATUS = 3;//退学
}